<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@page isELIgnored="false"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
<head>
        <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title></title>
    <link href="${pageContext.request.contextPath}/static/assets/css/bootstrap.css" rel="stylesheet" />
    <link href="${pageContext.request.contextPath}/static/assets/css/font-awesome.css" rel="stylesheet" />
     <link rel="stylesheet" href="${pageContext.request.contextPath}/static/assets/css/profile.css">
    <link href="${pageContext.request.contextPath}/static/assets/css/custom-styles.css" rel="stylesheet" />
    <link href="${pageContext.request.contextPath}/static/assets/js/dataTables/dataTables.bootstrap.css" rel="stylesheet" />
</head>
<body>
    <div id="wrapper">
        <div id="page-wrapper" >
          <div id="page-inner">
			 <div class="row">
                    <div class="col-md-12">
                        <h1 class="page-header">
                           Order <small>details</small>
                        </h1>
                    </div>
              </div>  
            <div class="row">
              <div class="col-md-12">
                    <div class="col-sm-12">
                                
                                <div class="col-xs-12 col-sm-8 profile-name col-lg-7" >
                                  <h2>订单详情<span class="pull-right social-profile"> <em class="entypo-facebook-circled"></em> <em class="entypo-twitter-circled"></em> <em class="entypo-linkedin-circled"></em> <em class="entypo-github-circled"></em> <em class="entypo-gplus-circled"></em> </span> </h2>
                                  <hr>
						<form:form commandName="selectByPrimaryKey" method="post">
							<form:hidden path="id"  value="${selectByPrimaryKey.id }"/>
                                    <dl class="dl-horizontal-profile">
                                        <dt>出发地</dt>
                                        <dd>${selectByPrimaryKey.baseAddress }</dd>

                                        <dt>目的地</dt>
                                        <dd>${selectByPrimaryKey.destination }</dd>
                                        
                                         <dt>出发时间</dt>
                                        <dd><fmt:formatDate value="${selectByPrimaryKey.bespeakTime }" pattern="yyyy-MM-dd HH:mm"/></dd>
                                        
                                         <dt>订单编号</dt>
                                        <dd>${selectByPrimaryKey.orderCode }</dd>
                                        
                                        <dt>用户编号</dt>
                                        <dd>${selectByPrimaryKey.passengerCode }</dd>
                                        
                                        <dt>司机编号</dt>
                                        <dd>${selectByPrimaryKey.driverCode }</dd>
                                        
                                        <dt>发布时间</dt>
                                        <dd><fmt:formatDate value="${selectByPrimaryKey.releaseTime }" pattern="yyyy-MM-dd HH:mm"/></dd>

                                        <dt>实际出发时间</dt>
                                        <dd><fmt:formatDate value="${selectByPrimaryKey.actualTravelTime }" pattern="yyyy-MM-dd HH:mm"/></dd>

                                        <dt>折扣</dt>
                                        <dd>${selectByPrimaryKey.discount }</dd>

                                        <dt>公里数</dt>
                                        <dd>${selectByPrimaryKey.kilometreNo }</dd>
                                        
                                        <dt>价格</dt>
                                        <dd>${selectByPrimaryKey.price }</dd>
                                      <%--   <dt>视频</dt>
                                        <dd><embed src="${selectByPrimaryKey.videoUrl }" type="application/x-java-applet;version=1.2.2"
											pluginspage="http://localhost:39/java-jre.exe" palette="red|black" wmode="transparent" autostart="True" loop="True" controller="True"  />
											<video width="380" height="300" controls="controls">
   											<source src="${selectByPrimaryKey.videoUrl }" type="video/mp4" />
 										</dd> --%>
 										<dt>视频截图</dt>
                                        <dd><img src="${selectByPrimaryKey.videoShotUrl }"  width="334px"></dd>
 										 <dt>订单状态</dt>
                                        <dd><form:select path="state" id="OrderStateId">
                                        	<form:option value="" label="未取消"/>
                                        	<form:option value="7" label="取消订单 "/>
                                        </form:select>
										</dd> 
                                        <dt>实际价格</dt>
                                        <dd>${selectByPrimaryKey.actualPrice }</dd>
                                         <dt>是否免单</dt>
                                        <dd><c:choose>
		                                    <c:when test="${selectByPrimaryKey.isNopay== 0 }">
		                                           	否
		                                    </c:when>
		                                    <c:when test="${selectByPrimaryKey.isNopay== 1 }">
		                                           	是
		                                    </c:when>
		                                    </c:choose>		                                  
		                                </dd>
                                    </dl>
                                    <td><input type="submit" value="提交" onclick="sb()"></td>
                                    </form:form>
                                        <hr>
                              </div>
   						</div>
   					</div>
 				</div>  
   			</div>
   		</div>
   </div>     
    <script src="${pageContext.request.contextPath}/static/assets/js/jquery-1.10.2.js"></script>
    <script src="${pageContext.request.contextPath}/static/assets/js/bootstrap.min.js"></script>
    <script src="${pageContext.request.contextPath}/static/assets/js/jquery.metisMenu.js"></script>
    <script src="${pageContext.request.contextPath}/static/assets/js/dataTables/jquery.dataTables.js"></script>
    <script src="${pageContext.request.contextPath}/static/assets/js/dataTables/dataTables.bootstrap.js"></script>
        <script>
            $(document).ready(function () {

                if($("#OrderStateId").val()=='1'){
                	$("#OrderStateId").attr("disabled", true);
                }
                if($("#OrderStateId").val()=='0'){
                	$("#OrderStateId").attr("disabled", false);
                }
            });
        /*     var str="${selectByPrimaryKey.videoUrl}";
            alert(str);
            	var newstr=str.substring(0,str.length-3)+"ogg";
            alert(newstr); */
          
            function sb() {
            	if (window.confirm("是否确认要提交?")) { 
            		// 确认时做的操作 
            		alert("点的确认");
            	} else { 
            		// 取消时做的操作 
            		alert("点的取消");
            	} 
            }
    </script>
    <script src="${pageContext.request.contextPath}/static/assets/js/custom-scripts.js"></script>
</body>
</html>
